﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [ExcelExporter(Name = "装备构件")]
    [Table(Name = "goujianzhuangbei")]
    public class GouJianZhuangBei
    {
        [IEIgnore(IsExportIgnore = true)]
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "bzzbtid")]
        [JsonProperty("bzzbtid")]
        [Description("保障装备类型ID")]
        public long Bzzbtid { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "bzzbid")]
        [JsonProperty("bzzbid")]
        [Description("保障装备ID，车辆类或者设备类ID")]
        public long Bzzbid { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "jtid")]
        [JsonProperty("jtid")]
        [Description("具体车辆或者设备ID")]
        public long Jtid { get; set; }

        [ExporterHeader(DisplayName = "构件唯一编码")]
        [Column(Name = "gjwybm")]
        [JsonProperty("gjwybm")]
        [Description("构件唯一编码")]
        public string Gjwybm { get; set; }

        [ExporterHeader(DisplayName = "构件名称")]
        [Column(Name = "name")]
        [JsonProperty("name")]
        [Description("构件名称")]
        public string Name { get; set; }

        [ExporterHeader(DisplayName = "构件型号")]
        [Column(Name = "gjxh")]
        [JsonProperty("gjxh")]
        [Description("构件型号")]
        public string Gjxh { get; set; }

        [ExporterHeader(DisplayName = "构件出厂号")]
        [Column(Name = "gjcch")]
        [JsonProperty("gjcch")]
        [Description("构件出厂号")]
        public string Gjcch { get; set; }

        [ExporterHeader(DisplayName = "所属编码")]
        [Column(Name = "ssbm")]
        [JsonProperty("ssbm")]
        [Description("所属编码")]
        public string Ssbm { get; set; }

        [ExporterHeader(DisplayName = "车牌号")]
        [Column(Name = "cph")]
        [JsonProperty("cph")]
        [Description("车牌号")]
        public string Cph { get; set; }

        [ExporterHeader(DisplayName = "名称")]
        [Column(Name = "mc")]
        [JsonProperty("mc")]
        [Description("名称")]
        public string Mc { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
